import request from "@/utils/request.js"
import {
	API
} from "@/utils/api.js"

export function Switch() {
	//小程序隐藏的开关 用于逃避微信审核
	return request.get({
		url: "/index/index/Switch"
	})
}

export const upload = API + "/index/index/Upload"; //图片上传接口

export function wxLogin(data) {
	//向服务器提交登录的 code 换取用户openid
	return request.post({
		url: "/index/index/wxLogin",
		data
	})
}

export function article_lsit(params) {
	//文章列表
	return request.get({
		url: "/index/index/article_lsit",
		params
	})
}

export function article_info(id) {
	//根据ID查询文章详细
	return request.get({
		url: "/index/index/article_info",
		params: {
			id
		}
	})
}

export function open_code(code) {
	//根据code码获取工具表内容
	return request.get({
		url: "/index/index/open_code",
		params: {
			code
		}
	})
}

export function submit_feedback(data) {
	//提交反馈
	return request.post({
		url: "/index/index/submit_feedback",
		data
	})
}

export function public_user_list(params) {
	//公共用户列表
	return request.get({
		url: "/index/index/public_user_list",
		params
	})
}

export function public_user_info(id) {
	//根据ID查询公共用户详细
	return request.get({
		url: "/index/index/public_user_info",
		params: {
			id
		}
	})
}

export function shoot_map(params) {
	//获取墙友拍列表
	return request.get({
		url: "/index/index/shoot_map",
		params
	})
}

export function shoot_map_find(id) {
	//根据ID获取墙友拍文章详情
	return request.get({
		url: "/index/index/shoot_map_find",
		params: {
			id
		}
	})
}

export function shoot_map_list(params) {
	//获取墙友拍列表 分页
	return request.get({
		url: "/index/index/shoot_map_list",
		params
	})
}

export function wall_list() {
	//获取墙类型列表
	return request.get({
		url: "/index/index/wall_list"
	})
}

export function comment_list(params) {
	//获取评论列表
	return request.get({
		url: "/index/index/comment_list",
		params
	})
}

export function get_room_list(params) {
	//获取聊天室历史聊天记录
	return request.get({
		url: "/index/index/get_room_list",
		params
	})
}
